package com.siyu.rehearsal.previewriska.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.siyu.rehearsal.previewriska.mapper.PreviewRiskAMapper;
import com.siyu.rehearsal.previewriska.domain.PreviewRiskA;
import com.siyu.rehearsal.previewriska.service.IPreviewRiskAService;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.siyu.rehearsal.previewriska.mapper.PreviewRiskAMapper;
import com.siyu.rehearsal.previewriska.domain.PreviewRiskA;
import com.siyu.rehearsal.previewriska.service.IPreviewRiskAService;

/**
 * 预演结果风险评估Service业务层处理
 *
 * @author hrhy
 * @date 2024-06-15
 */
@Service
public class PreviewRiskAServiceImpl extends ServiceImpl<PreviewRiskAMapper, PreviewRiskA> implements IPreviewRiskAService
{
    @Autowired
    private PreviewRiskAMapper previewRiskAMapper;

    /**
     * 查询预演结果风险评估
     *
     * @param id 预演结果风险评估主键
     * @return 预演结果风险评估
     */
    @Override
    public PreviewRiskA selectPreviewRiskAById(String id)
    {
        return previewRiskAMapper.selectPreviewRiskAById(id);
    }

    /**
     * 查询预演结果风险评估列表
     *
     * @param previewRiskA 预演结果风险评估
     * @return 预演结果风险评估
     */
    @Override
    public List<PreviewRiskA> selectPreviewRiskAList(PreviewRiskA previewRiskA)
    {
        return previewRiskAMapper.selectPreviewRiskAList(previewRiskA);
    }

    /**
     * 新增预演结果风险评估
     *
     * @param previewRiskA 预演结果风险评估
     * @return 结果
     */
    @Override
    public int insertPreviewRiskA(PreviewRiskA previewRiskA)
    {
            return previewRiskAMapper.insertPreviewRiskA(previewRiskA);
    }

    /**
     * 修改预演结果风险评估
     *
     * @param previewRiskA 预演结果风险评估
     * @return 结果
     */
    @Override
    public int updatePreviewRiskA(PreviewRiskA previewRiskA)
    {
        return previewRiskAMapper.updatePreviewRiskA(previewRiskA);
    }

    /**
     * 批量删除预演结果风险评估
     *
     * @param ids 需要删除的预演结果风险评估主键
     * @return 结果
     */
    @Override
    public int deletePreviewRiskAByIds(String[] ids)
    {
        return previewRiskAMapper.deletePreviewRiskAByIds(ids);
    }

    /**
     * 删除预演结果风险评估信息
     *
     * @param id 预演结果风险评估主键
     * @return 结果
     */
    @Override
    public int deletePreviewRiskAById(String id)
    {
        return previewRiskAMapper.deletePreviewRiskAById(id);
    }
}


